package regex;

import static net.ftng.commons.lang.utils.PrintUtils.println;

public class Date {

    public static void main(final String[] args) {

        String pattern = "(\\s-\\s)|(\\s)";

        String string = "2012-12-21 - 2012-12-21";
        println(string.split(pattern));

        string = "2012-12-21 2012-12-21";
        println(string.split(pattern));
    }
}
